﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using EPiServer.Core;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TemplateFoundation.Tests.UnitTests.Translations
{
    [TestClass]
    public class TestGenericLanguageDocumentIsLoaded
    {
        [TestMethod]
        public void TestRetrievingEmbeddedEnglishTranslationThroughLanguageManager()
        {
            const string expected = "This is the message to test for";

            var actual = LanguageManager.Instance.Translate("/translationforunittests", "en");

            Assert.AreEqual(expected, actual, "Unable to verify translations from embedded resource in LanguageManager");
        }

        [TestMethod]
        public void TestRetrievingEmbeddedSwedishTranslationThroughLanguageManager()
        {
            const string expected = "Detta är en översättning att enhetstesta emot";

            var actual = LanguageManager.Instance.Translate("/translationforunittests", "sv");

            Assert.AreEqual(expected, actual, "Unable to verify translations from embedded resource in LanguageManager");
        }
    }
}
